package game.buildings;

/**
 *	@(#)BuildingType.java
 *
 *	The <code>BuildingType</code> enum lists all available buildings.
 *	The order is chosen in such way that no building will be completely
 *	hidden by another one. Also, land buildings come last.
 *
 *	@author Grzegorz Kobiela
 *	@version 1.0 2007/8/7
 */
public enum BuildingType
{
	GRAVE, HOUSE, FOUNTAIN, STORAGE, CARTSHOP, EXPLORER, GRANARY,
	BREWERY, HARBOUR, FORCEDLABOUR, CATHEDRAL, MARKET, STABLES,
	UNIVERSITY, HOSPITAL, BIOLOGY, ALCHEMY, THEOLOGY, PHILOSOPHY,
	DUMP, FISHERMAN, WOODCUTTER, MINE, INN, CITY, FARM;

	/**
	 *	Returns true if the value represents a city building.
	 *	@return true if the value represents a city building
	 */
	public boolean isCityBuilding() {
		return (ordinal() < 20);
	}

	/**
	 *	Returns true if the value represents a land building.
	 *	@return true if the value represents a land building
	 */
	public boolean isLandBuilding() {
		return !isCityBuilding();
	}

	/**
	 *	Returns the name in lower case
	 *	@return the name
	 */
	@Override
	public String toString() {
		return super.toString().toLowerCase();
	}
}